<?php $this->load->view('scenic/layout/header') ?>
<div class="main-page">
    <header class="newscenic-head newscenic-head-index flex">
        <div class="am-header-left am-header-nav">
            <a href="javascript:goHistoryBack('<?php echo site_url();?>');" class="sec-return">
               <i class="iconfont">&#xe606;</i><!-- 返回首页 -->
            </a>
        </div>
        <div class="flex-1 search-section flex flex-align-center">
            <div class="newscenic-city sec-city">
                <?php echo $cityName ?>
                <i class="iconfont icon-role">&#xe601;</i>
            </div>
            <div class="flex-1 search-box">
                <div class="search-input">
                    <i class="iconfont">&#xe635;</i>
                  <span>请输入搜索关键词</span>
              </div>
            </div>
        </div>
        <div class="am-header-right am-header-nav">
            <a href="<?php echo site_url('home/ucenter/index');?>">
                <i class="iconfont">&#xe622;</i><!-- 个人中心 -->
            </a>
        </div>
    </header>
    <div class="widthMax">
        <div class="am-slider am-slider-default newsec-lunbo" data-am-flexslider id="demo-slider-0">
            <ul class="am-slides">
                <?php foreach($advert as $value): ?>
                <li>
                    <a href="<?php echo $value->openvar;?>">
                        <img src="<?php echo $this->config->show_image_url($value->picture);?>">
                    </a>
                </li>
                <?php endforeach ?>
            </ul>
        </div>
        <ul class="newsec-nearby flex">
            <li>
                <a href="<?php echo site_url('scenic/search/index').'?keyword='.$cityName;?>">
                    <div class="flex-align-center flex">
                        <p><?php echo $cityName ?>景区</p>
                        <div class="flex-right"><i></i></div>
                    </div>
                </a>
            </li>
            <li>
                <a href="<?php echo site_url('scenic/info/zhuanqu/'.$parentId);?>">
                    <div class="flex-align-center flex">
                        <p>周边景区</p>
                        <div class="flex-right"><i></i></div>
                    </div>
                </a>
            </li>
        </ul>
        <div class="newsec-box newsec-subject">
            <div class="box-head">特色主题</div>
            <ul class="flex newsec-subject-list">
                <li>
                    <a href="<?php echo site_url('scenic/search/index').'?start=0&keyword='.$cityName.'&provinceid=&cityid=&theme=1'; ?>">
                        <i class="iconfont">&#xe84e;</i>
                        <p>风景名胜</p>
                    </a>
                </li>
                <li>
                    <a href="<?php echo site_url('scenic/search/index').'?start=0&keyword='.$cityName.'&provinceid=&cityid=&theme=2'; ?>">
                        <i class="iconfont icon-guzhen">&#xe6ce;</i>
                        <p>古镇名城</p>
                    </a>
                </li>
                <li>
                    <a href="<?php echo site_url('scenic/search/index').'?start=0&keyword='.$cityName.'&provinceid=&cityid=&theme=11'; ?>">
                        <i class="iconfont icon-renwen">&#xe66e;</i>
                        <p>人文景观</p>
                    </a>
                </li>
                <li>
                    <a href="<?php echo site_url('scenic/search/index').'?start=0&keyword='.$cityName.'&provinceid=&cityid=&theme=5'; ?>">
                        <i class="iconfont icon-huaxu">&#xe6b9;</i>
                        <p>温泉滑雪</p>
                    </a>
                </li>
                <li>
                    <a href="<?php echo site_url('scenic/search/index').'?start=0&keyword='.$cityName.'&provinceid=&cityid=&theme=4'; ?>">
                        <i class="iconfont icon-leyuan">&#xe658;</i>
                        <p>主题乐园</p>
                    </a>
                </li>
            </ul>
        </div>
        <!-- 杭州人气景区 -->
        <div class="newsec-box newsec-hot">
            <div class="box-head">杭州人气景区</div>
            <?php if (count($sceneryOnSal) > 0) :?>
                <ul class="newsec-hot-list am-cf">
                    <?php foreach ($sceneryOnSal as $value) :?>
                        <li>
                            <a href="<?php echo site_url('scenic/info/index/'.$value->sid); ?>">
                                <img class="lazy" src="/skins/scenic/images/load.jpg" data-original="<?php echo $this->config->show_image_url($value->minipics); ?>">
                                <div class="info">
                                    <p class="am-text-truncate title"><?php echo $value->name_hanzi; ?></p>
                                    <div class="price">
                                        <em><i>￥</i><?php echo $value->shop_price; ?></em>起
                                    </div>
                                </div>
                            </a>
                        </li>
                    <?php endforeach;?>
                </ul>
            <?php else : ?>
                <div class="no-scenic">
                    <img src="/skins/scenic/images/noscenic.jpg">
                    <p class="tips">该城市暂无景区</p>
                    <p><a href="<?php echo site_url('tourism/exotic/index/'.$parentId); ?>" class="btn">去其它城市看看 ></a></p>
                </div>
            <?php endif;?>
        </div>
        <?php if (count($sceneryHot) > 0) :?>
            <!-- 精选推荐景区 -->
            <div class="newsec-box newsec-recommend">
                <div class="box-head">精选推荐景区</div>
                <ul class="newsec-recommend-list">
                    <?php foreach ($sceneryHot as $value) :?>
                        <li>
                            <a href="<?php echo site_url('scenic/info/index/'.$value->sid); ?>">
                                <div class="flex">
                                    <img class="lazy" src="/skins/scenic/images/load.jpg" data-original="<?php echo $this->config->show_image_url($value->minipics); ?>">
                                    <div class="info flex-1 flex flex-v flex-pack-justify">
                                        <p class="title"><?php echo $value->name_hanzi; ?></p>
                                        <p class="newsec-level"><?php echo $value->star_rank > 2 ? $value->star_rank : 3 ?>A景区</p>
                                        <div class="newsec-tags flex flex-align-center">
                                            <?php if ($value->off_bonus > 0) :?><span class="jinbi">积分可抵</span><?php endif;?>
                                            <?php if ($value->advance_date == 0) :?><span class="dingpiao">可订今日票</span><?php endif;?>
                                        </div>
                                        <div class="bottom">
                                            <span class="price"><em><i>￥</i><?php echo $value->shop_price; ?></em>起</span>
                                            <span><?php echo $value->sales_volume; ?>人已购买</span>
                                        </div>
                                    </div>
                                </div>
                            </a>
                        </li>
                    <?php endforeach;?>
                </ul>
                <div class="newsec-more-link">
                    <a href="<?php echo site_url('scenic/search/index').'?keyword='.$cityName;?>">查看更多<?php echo $cityName ?>景区 ></a>
                </div>
            </div>
        <?php endif;?>
        <div class="newsec-box newsec-links">
            <ul class="flex">
                <li><a href="<?php echo $this->config->jiudian_url.'m/home/grid.html';?>"><img src="/skins/scenic/images/jiudian.jpg"></a></li>
                <li><a href="<?php echo site_url('tourism/exotic/index/'.$parentId); ?>"><img src="/skins/scenic/images/techan.jpg"></a></li>
            </ul>
        </div>
    </div>
    <footer class="newsec-footer">
        <ul class="flex">
            <li>
                <a href="javascript:;">
                    <i class="iconfont">&#xe62f;</i><span>全国门票</span>
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="iconfont">&#xe626;</i><span>预订便捷</span>
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="iconfont">&#xe62e;</i><span>快速入园</span>
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    <i class="iconfont icon-tuigai">&#xe652;</i><span>退改方便</span>
                </a>
            </li>
        </ul>
    </footer>
</div>
<div class="minor-page newsec-minor-page">
    <?php $this->load->view('scenic/home/search');?>
</div>
<div class="city-page newsec-city-page">
    <?php $this->load->view('scenic/home/city');?>
</div>
